package com.example.aop;

import org.springframework.context.annotation.AnnotationConfigApplicationContext;

public class Example {
    public static void main(String[] args) {

        AnnotationConfigApplicationContext applicationContext =
                new AnnotationConfigApplicationContext(AOPConfig.class);

        CalculatorService calculatorService = applicationContext.getBean(CalculatorService.class);
        int result = calculatorService.add(10, 20);
        System.out.println(result);
        applicationContext.close();
    }
}
